The present invention relates to a method for preparing a speed instruction pattern for a servo motor in a positioning device.
Conventionally, to prepare a speed pattern in a positioning device (CPU, controllers, servo amplifiers, and the like), the speed pattern preparation cycle and speed data are set as shown in FIGS. 3(a) and 3(b), that is, speed data is set to 32 bits in both FIG. 3(a) and FIG. 3(b), and by means of the fixed decimal mode, 16 bits are set for the integer part and 16 bits are set for the decimal part to fix the decimal point position. The speed pattern preparation cycle as a cycle for outputting speed data is set to 8 m sec in the case of FIG. 3(a) and 64 m sec in the case of FIG. 3(b).
In the case of FIG. 3(a). the speed data maximum value is 245752500 (unit: min) and the minimum resolution is 0.11 (unit: min), on the other hand, in FIG. 3(b), the speed lowers and the resolution increases to a degree at which the speed data maximum value is 30719062 (unit: min) and the minimum resolution is 0.014 (unit: min).
Thus, the speed minimum resolution to be used inside the a positioning device has conventionally been set to a fixed value of 0.11 (unit: min) in FIG. 3(a) and 0.014 (unit: min) in FIG. 3(b) based on a speed pattern preparation cycle, speed unit specified by a user, and speed data maximum value specified by the user.
However, in the abovementioned conventional example, the larger the speed data maximum value, the larger the minimum resolution, and the smaller the minimum resolution, the smaller the speed data maximum value. Therefore, when the speed pattern preparation period of the positioning device is changed, the minimum resolution changes, and when the speed resolution becomes insufficient due to the speed unit specified by a user and speed data maximum value specified by the user, the speed data maximum value is limited.
Therefore, an object of the invention is to provide a dynamic optimizing method for speed data, which does not fix the resolution of speed data to be used inside a positioning device, but distinguishes a dynamic optimum resolution, and in accordance with various speed pattern preparation cycles, user specified speed units, and speed data maximum values and minimum resolutions, can provide an environment which guarantees constant accuracy in a speed pattern determined by the user.
Furthermore, another object of the invention is to provide a positioning device using this method.
In order to solve the abovementioned problem, the present invention provides a dynamic optimizing method for speed data used for preparing a speed instruction pattern fed to a servo motor in a positioning device, characterized in that a speed pattern generator is provided, which calculates a desired speed pattern when a moving distance, speed, acceleration time, and deceleration time are inputted, a speed pattern preparation cycle can be specified by a user without a possibility that the speed data maximum value and minimum resolution of the speed data are modified.
According to a first aspect of the invention, the dynamic optimizing method for speed data is characterized in that a combination of a speed data maximum value and a minimum resolution can be selected by a user.
In addition, when a user specifies the speed pattern preparation cycle, the speed data maximum value and minimum resolution are prevented from changing by shifting the decimal part of the speed data to the right or left.
Furthermore, a positioning device using a servo motor comprises a moving instruction input unit, a speed pattern preparation unit for inputting a moving instruction from this moving instruction input unit, a speed instruction unit for outputting a speed instruction based on a speed instruction pattern from the speed pattern preparation unit in accordance with the speed instruction cycle specified by a user, and a servo control unit for driving the servo motor based on the speed instruction from this speed instruction unit.
According to this dynamic optimizing method for speed data, even when the speed pattern preparation cycle is dynamically changed, the speed data maximum value and minimum resolution are not influenced by this change, so that it becomes unnecessary to change a user program even when a user changes the speed pattern preparation cycle.